export function MP(ak) {  

return new Promise(function (resolve, reject) { 
	let src_ = 'http://api.map.baidu.com/getscript?'

    
    var script = document.createElement("script");  
    script.type = "text/javascript";  
    script.src = "http://api.map.baidu.com/api?v=2.0&ak=lAW6GP6dEoDcXRBkujwYLu5h9Fncmd00"+"&callback=init";  
    script.onerror = reject;  
    document.head.appendChild(script);  
    setTimeout(()=>{
    	resolve(BMap)
    },500);    
}) 
  
//return new Promise(function (resolve, reject) {
//            window.init = function () {
//            resolve(qq)//注意这里
//       }
//      var script = document.createElement("script");
//      script.type = "text/javascript";
//      script.src = "http://map.qq.com/api/js?v=2.exp&callback=init&key=W2FBZ-JRLCG-JVEQC-ISZWV-BYVGQ-3KBKV";
//      script.onerror = reject;
//      document.head.appendChild(script);
//    })
  
} 

